package server.xmpp;

import server.UserManagement;
import util.pref.PrefHandler;

import java.io.FileNotFoundException;
import java.util.HashMap;
import java.util.Scanner;

/**
 * @author Maris
 *
 */
public class UnitTestXMPPServer {

	public static void main(String[] args) throws FileNotFoundException {
		String configfile = "versi_server.properties";
		
		PrefHandler p = new PrefHandler(configfile);
		HashMap<String,String> config = p.getAllPreferences();
				  	
		UserManagement um = UserManagement.getInstance(config);
		um.init();
		
		XMPPServerClass server = XMPPServerClass.getInstance(config); 
		server.init(um.getProviderRegistry());
	
		System.out.println("Hit enter to exit.");
		Scanner sc = new Scanner(System.in);
		sc.nextLine();

		server.destroy();
		um.destroy();
	}

}
